<div id="wrapper" style="height:420px;">
<div id="contenido">
<?php if ($error) { ?>
}
<div class="warning"><?php echo $error; ?></div>
<?php } ?>
<div class="heading"><?php echo $heading_title; ?></div>
<div class="description"><?php echo $heading_description; ?></div>
<script type="text/javascript" src="javascript/tab/tab.js"></script>
<link rel="stylesheet" type="text/css" href="javascript/tab/tab.css" />


<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form" name="form">

    <div class="tab" id="tab">
    <div class="tabs"><a><?php echo $tab_general; ?></a><a>Permisos</a></div>
    <div class="pages">
      <div class="page">
        <div class="pad">
          <table>
            <tr>
	          <td width="185"><span class="required">*</span> <?php echo $entry_grupo; ?></td>
              <td>
              
              <?php
              	 if ($_REQUEST['action'] == 'update') { ?> 
              	<input type="text" name="grupo" value="<?php echo $grupo; ?>" readonly/>
               <?php } 
               	else
               	{
               ?>
              	<input type="text" name="grupo" value="<?php echo $grupo; ?>"/>
              <?php } ?> 
                <?php if ($error_grupo) { ?>
                <span class="error"><?php echo $error_grupo; ?></span>
                <?php } ?></td>
           </tr>
            <tr>
	          <td width="185"><span class="required">*</span> <?php echo $entry_descripcion; ?></td>
              <td><input type="text" name="descripcion" value="<?php echo $descripcion; ?>" size="50" />
                <?php if ($error_descripcion) { ?>
                <span class="error"><?php echo $error_descripcion; ?></span>
                <?php } ?></td>
           </tr>
          </table>
        </div>
      </div>
      <div class="page">
        <div class="pad">
          <table>
           <tr>
              <td valign="top" align="center"><?php echo $entry_alta; ?></td>
              <td valign="top" align="center"><?php echo $entry_baja; ?></td>
              <td valign="top" align="center"><?php echo $entry_modificacion; ?></td>
              <td valign="top" align="center"><?php echo $entry_consulta; ?></td>
           </tr>
	   <tr>
              <td><div id="contenedor" style="height:250px; width:180px; overflow:auto; border-right: #383838 1px solid; border-top: #383838 1px solid; border-left: #383838 1px solid; border-bottom: #383838 1px solid ">
                  <?php foreach ($permissions as $permission) { ?>
                  <?php if (!$permission['alta']) { ?>
					<input type="checkbox" name="altas[]" value="<?php echo $permission['name']; ?>"><?php echo $permission['name']; ?><br>	
                  <?php } else { ?>
					<input type="checkbox" name="altas[]" value="<?php echo $permission['name']; ?>" checked><?php echo $permission['name']; ?><br>	
                  <?php } ?>
                   <?php } ?>
              	</div>
              </td>              
              <td><div id="contenedor" style="height:250px; width:180px; overflow:auto; border-right: #383838 1px solid; border-top: #383838 1px solid; border-left: #383838 1px solid; border-bottom: #383838 1px solid ">
                  <?php foreach ($permissions as $permission) { ?>
                  <?php if (!$permission['baja']) { ?>
					<input type="checkbox" name="bajas[]" value="<?php echo $permission['name']; ?>"><?php echo $permission['name']; ?><br>	
                  <?php } else { ?>
					<input type="checkbox" name="bajas[]" value="<?php echo $permission['name']; ?>" checked><?php echo $permission['name']; ?><br>	
                  <?php } ?>
                   <?php } ?>
              	</div>
              </td>              
              <td><div id="contenedor" style="height:250px; width:180px; overflow:auto; border-right: #383838 1px solid; border-top: #383838 1px solid; border-left: #383838 1px solid; border-bottom: #383838 1px solid ">
                  <?php foreach ($permissions as $permission) { ?>
                  <?php if (!$permission['modificacion']) { ?>
					<input type="checkbox" name="modificaciones[]" value="<?php echo $permission['name']; ?>"><?php echo $permission['name']; ?><br>	
                  <?php } else { ?>
					<input type="checkbox" name="modificaciones[]" value="<?php echo $permission['name']; ?>" checked><?php echo $permission['name']; ?><br>	
                  <?php } ?>
                   <?php } ?>
              	</div>
              </td>
              <td><div id="contenedor" style="height:250px; width:180px; overflow:auto; border-right: #383838 1px solid; border-top: #383838 1px solid; border-left: #383838 1px solid; border-bottom: #383838 1px solid ">
                  <?php foreach ($permissions as $permission) { ?>
                  <?php if (!$permission['consulta']) { ?>
					<input type="checkbox" name="consultas[]" value="<?php echo $permission['name']; ?>"><?php echo $permission['name']; ?><br>	
                  <?php } else { ?>
					<input type="checkbox" name="consultas[]" value="<?php echo $permission['name']; ?>" checked><?php echo $permission['name']; ?><br>	
                  <?php } ?>
                   <?php } ?>
              	</div>
              </td>			
            </tr>            
          </table>
		</div>
	 </div>		  
    </div>
  </div>
<div class="task">
  <div class="enabled" onmouseover="className='hover'" onmouseout="className='enabled'" onclick="document.getElementById('form').submit();"><img src="template/default/image/save_enabled.png" alt="<?php echo $button_save; ?>" class="png" /><?php echo $button_save; ?></div>
  <div class="enabled" onmouseover="className='hover'" onmouseout="className='enabled'" onclick="location='<?php echo $cancel; ?>'"><img src="template/default/image/cancel_enabled.png" alt="<?php echo $button_cancel; ?>" class="png" /><?php echo $button_cancel; ?></div>
</div>

  <script type="text/javascript"><!--
  tabview_initialize('tab');
  //--></script>
</form>
</div>
</div>